package com.a.a;

import java.util.Arrays;

class a {
    private final char[] a;
    private final int[] b;

    a(String str) {
        this.a = str.toCharArray();
        if (str.length() != 64) {
            throw new IllegalArgumentException("alphabet has incorrect length (should be 64, not " + str.length() + ")");
        }
        this.b = new int[128];
        Arrays.fill(this.b, -1);
        for (int i = 0; i < this.a.length; i++) {
            char c = this.a[i];
            if (c >= '') {
                throw new IllegalArgumentException("invalid character in alphabet: " + c);
            }
            this.b[c] = i;
        }
    }

    byte a(int i) {
        return (byte) this.a[i];
    }

    int a(byte b) {
        return b >= Byte.MIN_VALUE ? -1 : this.b[b];
    }

    boolean a(char c) {
        return c < '' && this.b[c] >= 0;
    }
}
